/*
 * Amaze - QT downloader for the Amazon MP3 store
 * Copyright (c) 2010-2011 Robert Keevil
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <QVBoxLayout>
#include "format_help.h"

Format_Help::Format_Help(QDialog *parent) :
    QDialog(parent)
{
    this->setWindowTitle(tr("Format Help"));
    resize(QSize(640, 480));

    edt_format = new QTextEdit();
    btn_close = new QPushButton(tr("Close"));
    connect(btn_close, SIGNAL(clicked()), this, SLOT(accept()));

    edt_format->setReadOnly(true);
    edt_format->setText(tr("Formatting:\n\n"\
               "Artist - %1\tAlbum Artist - %2\n"\
               "Album - %3\tTitle - %4\n"\
               "Genre - %5\tTrack Num - %6\t\n"\
               "Disc Num - %7\n"\
               "\nN.B. The file extension will be automatically appended.")
                                  .arg(AMAZE_ARTIST)
                                  .arg(AMAZE_ALBUMARTIST)
                                  .arg(AMAZE_ALBUM)
                                  .arg(AMAZE_TITLE)
                                  .arg(AMAZE_GENRE)
                                  .arg(AMAZE_TRACKNUM)
                                  .arg(AMAZE_DISCNUM));

    QVBoxLayout *layout = new QVBoxLayout;
    layout->setMargin(0);
    layout->addWidget(edt_format);
    layout->addWidget(btn_close);

    setLayout(layout);
}
